package com.baizhi.controller;

import com.baizhi.entity.Admin;
import com.baizhi.feign.TestFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private TestFeign testFeign;

    @RequestMapping("getTest")
    public String getTest(){
        return testFeign.getTestFeign("Gl");
    }

    @RequestMapping("getTestAdmin")
    public Admin getTestAdmin(){
        Admin admin = new Admin();
        admin.setUserName("gl");
        admin.setPassword("123456");
        return testFeign.getTestAdmin(admin);
    }

}
